package com.lonni.rpc.core.util;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @author: lonni
 * @CreateTime: 2024-07-10  20:57
 * @Description:
 */
public class IpUtil {


    public static String getIp() {
        try {
            InetAddress inetAddress = InetAddress.getLocalHost();
            return inetAddress.getHostAddress();
        } catch (UnknownHostException e) {
            throw new RuntimeException(e);
        }
    }

}
